ENH: generate numpy scalars or 0D arrays#310
Conversation
|
Looks good. Can you check the tests with numpy itself, or at least array_api_compat.numpy, and then merge this? It's possible this could uncover some test failures, and we'd want to at least be aware of them if not fix them before merging here. This is an example of where having numpy tests run on CI could be useful (#298). array-api-strict does not use scalars (it internally converts any numpy scalar into a 0-D array), so the CI tests for it won't really say much here. |
Otherwise, on numpy we can generate a numpy scalar and copy=False, which fails with (Pdb) p np.asarray(np.False_, copy=False) *** ValueError: Unable to avoid copy while creating an array as requested.
|
It's interesting, actually. With numpy, with So, two things to discuss:
|
|
Merging after an offline discussion with Aaron. |
closes #289